vue 您所在的位置:网站首页 vue-json-editor tree vue

vue

2024-07-09 18:00| 来源: 网络整理| 查看: 265

vue-json-tree

CircleCI NPM License

Vue component that renders JSON data in a collapsible tree structure.

usage use in browsers Include the CSS and JS along with Vue, so you get a component. Instantiate the component with your data.   new Vue({    template: '',    el: '#app',    data: {      sample: '{"foo": "bar"}'    }  })  use with webpack and vue-loader Install the vue-json-tree package via NPM. npm install --save vue-json-tree Import the SFC (with CSS embedded) and register it as a component, either globally or in another component. import JsonTree from 'vue-json-tree'Vue.component('json-tree', JsonTree) props raw (string, optional)

The data you want to present in the tree view. Must be a valid JSON string, otherwise it fails.

data (any, optional)

If your JSON data has already been parsed, bind this one instead. Must be something that can be produced by JSON.parse().

level (number, optional)

Sometimes the data structure is very deep. You could set them to collapsed on load. By default all levels are expanded.

demo

https://myst729.github.io/vue-json-tree/

MIT © Leo



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有